#include "simple/support/meta/integer_sequence.hpp"

using namespace simple::support;

template <int... Is>
using iseq = std::integer_sequence<int, Is...>;

int main()
{
	using a = std::index_sequence<1, 2, 3, 4>;
	static_assert(std::is_same_v<meta::offset_sequence_t<a, -1>, std::index_sequence<0,1,2,3>>);
	static_assert(std::is_same_v<meta::offset_sequence_t<a, 10>, std::index_sequence<11,12,13,14>>);
	static_assert(std::is_same_v<meta::make_index_range<3, 7>, std::index_sequence<3,4,5,6>>);
	static_assert(std::is_same_v<meta::make_index_segment<13, 3>, std::index_sequence<13,14,15>>);

	static_assert(std::is_same_v<
		meta::concat_sequence_t<iseq<1,2>, iseq<3,4,5>>,
		iseq<1,2,3,4,5>>);

	static_assert(std::is_same_v<
		meta::offset_sequence_t<iseq<1,2,3>, -3>,
		iseq<-2,-1,0>>);

	static_assert(std::is_same_v<
		meta::fill_index_sequence_t<0,3>, std::index_sequence<0,0,0>>);
	static_assert(std::is_same_v<
		meta::fill_index_sequence_t<13,4>, std::index_sequence<13,13,13,13>>);

	static_assert(std::is_same_v<
		meta::reverse_sequence_t<iseq<1,2,3,4,5,6,7>>,
		iseq<7,6,5,4,3,2,1>
	>);

	return 0;
}
